package com.xiang.controller;

import com.xiang.domain.Customer;
import com.xiang.utils.AjaxResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户控制器
 *
 * @author xiangtianlei@gogpay.cn
 * @date 2023-01-31
 */
@RequestMapping("/user")
@RestController
public class UserController {

    Logger logger = LoggerFactory.getLogger(UserController.class);

    /**
     * 通过id获取客户
     *
     * @return {@link Customer }
     */
    @GetMapping("/getUser")
    public AjaxResult getCustomerById() {
        Customer customer = new Customer();
        customer.setName("张三");
        logger.info("被调用成功：{}", customer.toString());
        return AjaxResult.success(customer);
    }


}
